package com.itheima.io.reader.demo01;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class ReaderDemo01 {

    public static void main(String[] args) throws IOException {

        FileInputStream fileInputStream = new FileInputStream("itheima-io-reader\\a.txt");

        byte[] bytes = new byte[3];

        int by = fileInputStream.read();
        bytes[0] =(byte)by;

        int by2 = fileInputStream.read();
        bytes[1] = (byte)by2;

        int by3 = fileInputStream.read();
        bytes[2] = (byte)by3;

        String s = new String(bytes);
        System.out.println(s);

        fileInputStream.close();

    }

}
